package com.example.demo.service;

import com.example.demo.dto.OrderDTO;
import com.example.demo.dto.OrderDetailDTO;
import com.example.demo.entity.OrdersManagement;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 * 订单管理 服务类
 * </p>
 */
public interface OrdersManagementService extends IService<OrdersManagement> {
    String updateOrderStatus(OrdersManagement order);
    OrdersManagement getOrderById(Integer orderId);

    // 取消订单
    boolean cancelOrder(Integer orderId);
    // 确认收获
    boolean confirmOrder(Integer orderId);

    List<OrderDTO> getBuyerOrdersWithDetails(Integer buyerId);
    List<OrderDTO> getSellerOrdersWithDetails(Integer sellerId);

    OrderDetailDTO getOrderDetailById(Integer orderId);
}
